//TODO 客户端请求也使用RPC的方式，通过代理底层进行网络访问

import { game } from "cc";
import { C2G_EquipUpLevel } from "../../game/net/Codec";
import { Rpc } from "./RpcDecorator";
import { RpcMgr } from "./RpcMgr";

@Rpc("game")
export class Rpc_Equip{
    equipUpLevel(req:C2G_EquipUpLevel){
        let client = RpcMgr.getClient("game")
        if(!client){
            console.error("socket client 还未建立连接：game");
            return
        }
        // let byte: Uint8Array = ProtoUtils.encode(msgType, data);
        // let msgID: Uint8Array = MathUtils.numberToUint8Array(msgType);
        // // let msgID2: Uint8Array = MathUtils.numberToUint8Array(respType);
        // let msgArr = [];
        // msgID.forEach((value, index, arr) => {
        //     msgArr.push(value);
        // })
        // byte.forEach((value, index, arr) => {
        //     msgArr.push(value);
        // });
        // let msgByte: Uint8Array = new Uint8Array(msgArr.length);
        // msgByte.set(msgArr);
        // this._socket.send(msgByte.buffer);
    }
}

export default new Rpc_Equip();